
Vue.component2('a_1_0_0_2_0', {  
    template: `
        <div class="a_1_0_0_2_0_dir" ref="div":key="refresh" :style="'width='+data.width">
            <slot></slot>
        </div>
`,  
  data() {
      return {
        now_select:"-1",
        refresh:"1",/*用来刷新组件*/
        data:{width:"80%",
            height:"0",show_flag:true
        }
         
      };
  },
  watch:{
    'data.show_flag':function(e){
      let _this=this;
        _this.$nextTick(() => {
            if(e){
                _this.$refs.div.style.display=_this.old_display;
            }else{
                _this.old_display=_this.$refs.div.style.display;
                _this.$refs.div.style.display='none';
            }
      }); 
    }
  },
  mounted:function(){
    
    _this.data.change_height=function(val){
      _this.data.height=val;
      _this.$nextTick(() => {
     _this.$refs.div.style.height = _this.data.height;
    }); 
  }
  _this.data.change_width=function(val){
      _this.data.width=val;
      _this.$nextTick(() => {
     _this.$refs.div.style.width = _this.data.width;
    }); 
  }
       
  }
} 
);

